<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/Mall_preferential_scheme.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_preferential_scheme.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '优惠方案',
                    name: 'Mall_preferential_scheme',
                    url: "/Mall_preferential_scheme/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"name":"","specifics":"","json":[],"spare2":""},
                editFormOptions: [[{ field: 'name', title: '优惠方案名称', type: 'text', required: true},
                                  { field: 'spare2', title: '类型', type: 'selectList', dataKey: 'Coupon_Type', data: []},],
                                  [{ field: 'specifics', title: '备注', type: 'textarea',colSize:12}, ]],
                searchFormFields: {"name":""},
                searchFormOptions: [[ {"title":"优惠方案名称","field":"name","type":"like"},]],
                columns: [
                  // {field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'name',title:'优惠方案名称',type:'string',width:220,align:'left'},
                       {field:'spare2',title:'类型',type:'string',width:80,align:'left',bind: {key:"Coupon_Type", data: []}},
                       {field:'specifics',title:'备注',type:'string',width:320,align:'left'},
                      //  {field:'json',title:'菜品json',type:'string',width:90,align:'left',sortable:true},
                      //  {field:'spare1',title:'备用1',type:'string',width:120,align:'left'},

                      //  {field:'spare3',title:'备用3',type:'string',width:120,align:'left'},
                      //  {field:'spare4',title:'备用4',type:'string',width:120,align:'left'},
                      //  {field:'spare5',title:'备用5',type:'string',width:120,align:'left'},
                       {field:'spare6',title:'备用6',type:'string',width:120,align:'left', bind: {key:'discount_type', data: [] },hidden:true,}
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
